const domain = '/api'

const userInfo = () => {
  return {
    id: 9527,
    name: 'admin',
    avatar: './images/avatar.jpeg',
    roles: ['admin'],
  }
};

export default [
  {
    url: `${domain}/login`,
    method: 'get',
    response: () => {
      return {
        code: 200,
        message: 'success',
        data: {
          token: 'token'
        }
      }
    }
  },
  {
    url: `${domain}/getUserInfo`,
    method: 'get',
    response: () => {
      return {
        code: 200,
        message: 'success',
        data: userInfo()
      }
    }
  },
  {
    url: `${domain}/logout`,
    method: "get",
    response: () => {
      return {
        code: 200,
        message: 'success'
      }
    },
  }
]
